Geofence with kalman filter

ABSTRACT

A least squares geofence method that minimizes trigger misfires caused by data variability and location blunders and minimizes delayed/missed entry triggers generated under urban or indoor conditions. The least squares geofence method uses a weighted least squares (LS) model to compute a location estimate for a target device. A LS location estimate is used to determine if a target device is located inside or outside a predefined geofence. The present invention additionally comprises a Kalman filter geofence method that further improves the accuracy of entry/exit geofence triggers. A Kalman filter geofence method uses a Kalman filter to filter location data retrieved for a target device. Filtered location data is used to determine if a target device is located inside or outside a predefined geofence. A Kalman filter geofence method estimates velocity and heading information for a target device to generate accurate entry/exit geofence triggers for devices in fast moving mode.

The present invention is a continuation of U.S. application Ser. No.14/752,009, entitled “Geofence with Kalman Filter”, filed on Jun. 26,2015; which is a continuation of U.S. application Ser. No. 13/783,719,entitled “Geofence with Kalman Filter”, filed on Mar. 4, 2013, now U.S.Pat. No. 9,113,298; which claims priority from U.S. ProvisionalApplication No. 61/658,584 to Weigen Qiu, entitled “Geofence with KalmanFilter” filed Jun. 12, 2012, the entirety of both of which is areexpressly incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates generally to communications. More particularly,it relates to location-based services.

2. Background of Related Art

Location enabling technology is implemented in a vast majority oftoday's handheld mobile devices as a result of a Federal CommunicationsCommission (FCC) mandate requiring wireless devices to incorporatelocation technology, in the event wireless users need to be locatedthroughout use of emergency services, e.g., E911. Location enablingtechnologies generally implemented in mobile devices include a precisesatellite-enabled Global Positioning System (GPS), cell towerpositioning, network access points, and several other trackingtechnologies capable of delivering approximate location of a wirelessdevice. This vast incorporation of location enabling technology intoday's handheld mobile devices has consequently led to a growingemergence of location based services (LBS). A location based service(LBS) obtains a geographic location of a wireless device and providesservices accordingly.

For instance, a geofence method is an existing location based service(LBS) that monitors location information for a wireless device, andenables an administrator to trigger a predetermined event each instancethat monitored device enters/exits a specified geographic location.

To implement a geofence method, an administrator defines a geofence(i.e. a virtual boundary) around a geographic location of interest(e.g., a point on a map, a school campus, a state, etc.), andarticulates one or more target devices to monitor against thatpredefined geofence. A geofence administrator additionally defines oneor more entry/exit events for each desired target device/geofencecombination.

In operation, whenever a geofence method detects a target deviceentering/exiting a predefined geofence, the geofence methodautomatically generates an entry/exit trigger, to trigger delivery of apredetermined entry/exit event defined for that particular targetdevice/geofence combination. An entry/exit event may be, e.g., anadvertisement, digital coupon, reminder, etc., triggered to a targetdevice entering/exiting a relevant geofence. Moreover, an entry/exitevent may additionally/alternatively be, e.g., an alert, reminder,notification, etc., triggered to a relevant geofence administrator.

A conventional geofence method periodically retrieves sample locationpoints for a given target device to determine that device's geographiclocation and trigger entry/exit events accordingly. More particularly,the geofence method uses three consecutive fast location fixes toevaluate a geofence side condition (e.g. inside, outside, unknown, etc.)for a specified target device. If the value of a geofence side conditionis ‘inside’ for a particular target device, that device is currentlylocated inside a predefined geofence. Likewise, if the value of ageofence side condition is ‘outside’ for a particular target device,that device is currently located outside a predefined geofence. Anentry/exit event is triggered whenever a change in side condition isdetected for a particular target device.

FIG. 19 depicts a conventional geofence method call flow.

In particular, a geofence method first determines an initial geofenceside condition (e.g. ‘inside’ or ‘outside’ a predefined geofence) for atarget device based on sample location points previously retrieved forthat particular device, as shown in step 1. Following determination ofan initial geofence side condition, the geofence method enters a slowfix mode and retrieves a slow location fix (i.e. a sample locationpoint) for the specified target device, as depicted in step 2. In step3, the geofence method analyzes the slow location fix (i.e. samplelocation point) retrieved in step 2, to determine a current geofenceside condition (e.g. inside, outside, unknown, etc.) for the relevanttarget device.

In step 4, the geofence method compares the current geofence sidecondition determined in step 3 to the initial geofence side conditiondetermined in step 1. If the current geofence side condition and theinitial geofence side condition have the same value (i.e. both sideconditions are ‘inside’ or both side conditions are ‘outside’), thegeofence method call flow loops back to step 1 and the value of theinitial geofence side condition (e.g. ‘inside’ or ‘outside’) remainsunchanged.

Alternatively, if the current geofence side condition (e.g. ‘inside’ or‘outside’) determined in step 3 and the initial geofence side conditiondetermined in step 1 differ, the geofence method enters a fast fix modeto investigate a potential side change.

To investigate a potential side change, the geofence method retrievesthree consecutive fast location fixes for the specified target device,as depicted in steps 5, 6, and 7. The geofence method subsequentlyevaluates three individual side conditions for each fast location fixretrieved, and then analyzes retrieved location fixes and evaluated sideconditions to determine a final geofence side condition for thespecified target device, as depicted in step 8. If location error areasfor all three fast location fixes are overlapped with the geofenceindependently, the geofence method determines that the target device islocated inside that predefined geofence.

FIG. 20 depicts three fast location fixes retrieved for a target devicethat is determinately located inside a predefined geofence.

In particular, if location error areas 201 for all three fast locationfixes retrieved for a target device are independently overlapped with ageofence 203 (as depicted in FIG. 20), the final geofence side conditionfor that target device is ‘inside’.

FIG. 21 depicts three fast location fixes retrieved for a target devicethat is determinately located outside a predefined geofence.

In particular, if location error areas 205 for all three fast locationfixes retrieved for a target device are not independently overlappedwith a geofence 203 (as depicted in FIG. 21), the final geofence sidecondition for that target device is ‘outside’.

In step 9 (FIG. 19), the geofence method compares the final geofenceside condition determined in step 8 to the initial geofence sidecondition determined in step 1. If the final geofence side condition andthe initial geofence side condition have the same value (i.e. both sideconditions are ‘inside’ or both side conditions are ‘outside’), thegeofence method call flow loops back to step 1 and the value of theinitial geofence side condition (e.g. ‘inside’ or ‘outside’) remainsunchanged.

Alternatively, if the final geofence side condition determined in step 8and the initial geofence side condition determined in step 1 differ, anappropriate geofence event is triggered, as depicted in step 10.

In step 11, the geofence method sets the value of the initial geofenceside condition equivalent to the value of the final geofence sidecondition (determined in step 8), and the geofence method call flowloops back to step 1.

A user may desire to implement a conventional geofence method for any ofa multitude of reasons. For instance, a geofence method may beimplemented to trigger digital coupons to a target device when thatdevice is within close proximity to a predefined geofence, i.e., astore, restaurant, city, etc. Moreover, a geofence method may enablefamily members to monitor location information for other family membersand/or employers to track employee whereabouts. In addition, a geofencemethod may trigger offers/discounts to participating consumers forbusinesses/stores within those consumers' general vicinity. Furthermore,a geofence method may enable law enforcement to better monitor trackingdevices and/or a homeowner to remotely activate/deactivate homeappliances when a relevant device enters/exits a relevant geofence.

Although a geofence method does encompass numerous advantageous uses,current geofence methods unfortunately experience occasional triggermisfires as a result of data variability and/or location blunders. Inaddition, current geofence methods occasionally generate delayed/missedentry triggers when performed under urban and/or indoor conditions. As aresult, the present inventors have appreciated that there is a need foran improved geofence method that generates entry/exit geofence triggersmore accurately without adversely affecting battery consumption.

SUMMARY OF THE INVENTION

In accordance with the principles of the present invention, a geofencemethod and technology that increases the probability of accurateentry/exit geofence triggers without additionally increasing theprobability of inaccurate entry/exit geofence triggers, comprises aleast squares geofence method. A least squares geofence methodintroduces inventive geofence steps and modifies existing geofence stepsto minimize trigger misfires caused by data variability and locationblunders and to minimize delayed/missed entry triggers generated underurban and/or indoor conditions. Inventive steps introduced in the leastsquares geofence method include: get trigger side fast, filterlocations, calculate least squares location, and entering or exitingfilter. Existing geofence steps modified in the inventive least squaresgeofence method include: wait until next fix time, enter slow fix mode,and get location.

In accordance with the principles of the present invention, the leastsquares geofence method uses a weighted least squares (LS) model tocompute a location estimate for a target wireless device based onseveral sample location points retrieved for that particular device. Aleast squares (LS) location estimate is used to evaluate whether atarget device is located inside or outside a predefined geofence.

In accordance with the principles of the present invention, a geofencemethod and technology that further increases the probability of accurateentry/exit geofence triggers without additionally increasing theprobability of inaccurate entry/exit geofence triggers, comprises aKalman filter geofence method. A Kalman filter geofence method uses anexisting Kalman filter to filter sample location points retrieved for atarget wireless device. Filtered location data is used to evaluatewhether a target device is located inside or outside a predefinedgeofence. Inventive modules introduced in the Kalman filter geofencemethod include: a system model/estimation module, a data qualityanalysis module, a geofence crossing detection module, a next locationtime request module, and a trip profile estimation module.

In accordance with the principles of the present invention, the Kalmanfilter geofence method evaluates velocity and heading information for atarget wireless device to enable accurate entry/exit geofence triggersto be generated for devices in motion.

In accordance with another aspect of the present invention, the Kalmanfilter geofence method dynamically determines a number of location fixesrequired to refine an initial judgement of geofence boundary crossing(i.e. initial geofence side condition) for a target wireless device. Inaddition, the Kalman filter geofence method dynamically determines timeintervals to implement between individual location fixes retrieved for atarget wireless device. Dynamically determining quantity of locationfixes and length of time intervals implemented between location fixesretrieved for a target wireless device, helps to conserve theconsumption of energy on that particular device.

BRIEF DESCRIPTION OF THE DRAWINGS

Features and advantages of the present invention become apparent tothose skilled in the art from the following description with referenceto the drawings:

FIG. 1 depicts an exemplary least squares geofence method call flow, inaccordance with the principles of the present invention.

FIG. 2 depicts coarse locates retrieved for a given target device, inaccordance with the principles of the present invention.

FIG. 3 depicts a weighted least squares (LS) location estimate computedfor a target wireless device, in accordance with the principles of thepresent invention.

FIG. 4 depicts network locates used to compute a location estimate for atarget wireless device, in accordance with the principles of the presentinvention.

FIG. 5 depicts exemplary GPS locates retrieved for a device in motion,in accordance with the principles of the present invention.

FIG. 6 depicts error circles for a series of indoor locates retrievedfor a target wireless device, in accordance with the principles of thepresent invention.

FIG. 7 depicts exemplary trigger misfires generated when only 3 samplelocation points are used to calculate location estimates for a targetwireless device, in accordance with the principles of the presentinvention.

FIG. 8 depicts exemplary geofence triggers generated when a locationestimate is computed using 5 sample location points retrieved for atarget wireless device, in accordance with the principles of the presentinvention.

FIG. 9 depicts indoor locates retrieved for a target device entering apredefined geofence, in accordance with the principles of the presentinvention.

FIG. 10 depicts indoor locates retrieved for a target device exiting ageofence, in accordance with the principles of the present invention.

FIG. 11 depicts indoor locates retrieved for a target wireless devicevia the existing geofence method.

FIG. 12 depicts location information for a device straddling a geofenceboundary for a prolonged period of time, in accordance with theprinciples of the present invention.

FIG. 13 portrays an exit trigger generated for a device straddling ageofence boundary for a prolonged period of time, in accordance with theprinciples of the present invention.

FIGS. 14A through 14C depict exemplary geofence events triggered by boththe least squares geofence method and the existing geofence method basedon outdoor locates retrieved for a target wireless device, in accordancewith the principles of the present invention.

FIG. 15 shows location information for a wireless device that isresident within three defined geofences, in accordance with theprinciples of the present invention.

FIG. 16 portrays a location log for an exemplary device that isstationary inside a geofence, in accordance with the principles of thepresent invention.

FIG. 17 portrays a location log for an exemplary wireless device thatexits a new geofence and remains near the boundary of that geofence, inaccordance with the principles of the present invention.

FIG. 18 shows a map of locations relative to the location log depictedin FIG. 17, in accordance with the principles of the present invention.

FIG. 19 depicts an exemplary geofence method call flow.

FIG. 20 depicts three exemplary fast location fixes retrieved for atarget device located inside a predefined geofence.

FIG. 21 depicts three exemplary fast location fixes retrieved for atarget device located outside a predefined geofence.

FIG. 22 depicts an exemplary Kalman filter geofence method call flow, inaccordance with the principles of the present invention.

FIG. 23 depicts an exemplary position estimate generated by the systemmodel/estimation module for a target wireless device, in accordance withthe principles of the present invention.

FIG. 24 depicts an exemplary velocity estimate produced by a systemmodel/estimation module, in accordance with the principles of thepresent invention.

FIG. 25 depicts exemplary blunder detection performed by the Kalmanfilter geofence method on cell network location data collected for atarget wireless device, in accordance with the principles of the presentinvention.

FIG. 26 depicts an illustrative example of heading information retrievedfor a target wireless device, in accordance with the principles of thepresent invention.

FIG. 27 depicts exemplary implementation of a Kalman filter in anexisting geofence method, in accordance with the principles of thepresent invention.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

The present invention comprises a least squares geofence method andtechnology that utilizes as much data as possible to increase theprobability of accurate entry/exit geofence triggers withoutadditionally increasing the probability of inaccurate entry/exitgeofence triggers. In particular, an inventive least squares geofencemethod alters an existing geofence method to address two major issues:delayed/missed entry triggers under urban and/or indoor conditions; andtrigger misfires caused by data variability and location blunders.

In accordance with the principles of the present invention, the leastsquares geofence method comprises the following events: determining whenand how to gather sample location points for a target wireless device;computing a location estimate for said target wireless device based ongathered sample location points; filtering said computed locationestimate based on a current state (i.e. geofence side condition) of saidtarget wireless device; and evaluating whether an event has beentriggered.

In accordance with the principles of the present invention, the leastsquares geofence method analyzes location data retrieved for a targetwireless device, to evaluate a geofence side condition for thatparticular device. If the value of a geofence side condition is ‘inside’for a target wireless device, that device is currently located inside apredefined geofence. Likewise, if the value of a geofence side conditionis ‘outside’ for a particular target device, that device is currentlylocated outside a predefined geofence. An entry/exit geofence trigger isgenerated whenever a change in geofence side condition is detected for atarget wireless device.

The present inventors have appreciated that controlling how often toobtain sample location points for a target wireless device, anddetermining an appropriate amount and type (e.g. GPS, network, cell,etc.) of sample location points to obtain, is key to generating accurateentry/exit geofence triggers.

The least squares geofence method disclosed herein assumes that usefulinformation may be obtained from all data retrieved for a targetwireless device. Moreover, the present invention assumes that the key toobtaining such useful information lies particularly in the manner inwhich data is extracted. For instance, a correlation of sample locationpoints retrieved for a target wireless device may signify the accuracyof a resultant location estimate. For example, a location estimate thatis computed based on a single sample location point may not yield muchstatistical confidence. Least squares utilizes the fact that if a seriesof location data is measured independently, the average of theselocation data is more reliable because errors are reduced by averagingdue to the randomness of the errors.

To trigger a geofence reliably, location information for a target devicemust be determined with a high level of confidence. In accordance withthe principles of the present invention, the least squares geofencemethod obtains enough sample location points to capture the truevariability of a geographic position of a wireless device, withoutadversely affecting battery consumption.

The least squares geofence method disclosed herein implementsstatistical techniques to estimate a geographic location of a wirelessdevice based on several sample location points. More particularly, theleast squares geofence method uses a conventional weighted least squares(LS) model to compute a weighted best estimate of a geographic positionof a wireless device. A conventional weighted least squares (LS) modelis simplified within the context of the present invention to reducecomputational intensity.

In addition, the present inventors have appreciated that filtering dataat an appropriate time is yet another key to increasing accurateentry/exit geofence triggers without additionally increasing inaccurateentry/exit geofence triggers. Sample location points retrieved for atarget wireless device are filtered prior to computing a locationestimate for that particular target wireless device. Least squares (LS)location estimates are subsequently computed and filtered, in accordancewith an anticipated trigger event.

The least squares geofence method must be careful to avoid falsepositives (i.e. false entry/exit triggers) caused by location blundersretrieved for a target wireless device. A blunder is a data point thatdoes not contain any truth. Hence, a blunder is detrimental to alocation estimate and therefore filtered by the least squares geofencemethod before a location estimate is computed.

To avoid computing a location estimate that contains/reflects locationblunders, the present invention filters (i.e. rejects) locations withpoor accuracies retrieved for a target wireless device. However, theleast squares geofence method is also careful not to filter alllocations retrieved for a target wireless device. For instance, a deviceexiting a geofence is often travelling, sometimes at high speeds. Beingthat sample data retrieved for a device in motion is not wellcorrelated, the present invention cannot filter all locations withmeager accuracies retrieved for a target wireless device. In accordancewith the principles of the present invention, when a state of a targetdevice is ‘inside’, the least squares geofence method filters allpositions computed for that device with poor accuracies, and insteadonly evaluates positions computed for that device with mediumaccuracies.

The least squares geofence method only generates an entry trigger when atarget device enters and remains inside a geofence. Consequently, theleast squares geofence method assumes that movement of a target deviceinside a geofence is limited. In accordance with the principles of thepresent invention, when a state of a target device is ‘outside’, theleast squares geofence method filters all positions computed for thatdevice with poor and medium accuracies, and instead only evaluatespositions computed for that device with high accuracies. Hence, theleast squares geofence method applies a stricter filter to detect ageofence entry than it does to detect a geofence departure.

The least squares geofence method modifies a conventional geofencefiltering technique, so that events may be triggered using indoorlocates without provoking severe boundary issues. Moreover, to reducegeofence complexity and potential future issues, the present inventionprefers to use general rules to filter a computed location estimate, asopposed to specific rules tailored to each use case.

In accordance with the principles of the present invention, the leastsquares geofence method comprises two particular cases of interest:exiting a geofence and entering a geofence. When a target device isinside the geographical confines of a geofence (i.e. the device'scurrent state of nature is ‘inside’), the only alternative available tothat device is to exit. Likewise, when a target device is outside thegeographical confines of a geofence (i.e. the device's current state ofnature is “outside”), the only alternative available to that device isto enter. Further, in terms of entering, the present invention is onlyinterested in the scenario in which a device enters and remains inside ageofence. Similarly, in terms of exiting, the present invention is onlyinterested in the scenario in which a device exits and remains outside ageofence (i.e. when a device has truly exited a geofence). The leastsquares geofence method thoroughly analyzes location data retrieved fora target wireless device to evaluate whether an entry/exit event hasbeen triggered.

In particular, the least squares geofence method uses techniques of theexisting gaussian geofence to evaluate whether an entry/exit event hasbeen triggered. However, instead of computing 3 separate geofence sideconditions for a target wireless device, based on 3 separate samplelocation points (as performed in a conventional geofence method), theleast squares geofence method computes only one geofence side conditionfor that target device, using a least squares (LS) location estimatebased on several sample location points.

FIG. 1 depicts an exemplary least squares geofence method call flow, inaccordance with the principles of the present invention.

As depicted in FIG. 1, new steps introduced in the least squaresgeofence method are designated ‘G’, and modifications made to existingsteps in the existing geofence method are designated ‘Y’. New steps Gshown in FIG. 1 modify the manner in which location data is captured,filtered, and used in the existing geofence method.

In particular, get trigger side fast 102 is an inventive geofence stepthat uses a point in circle algorithm to evaluate whether a locationretrieved for a target wireless device is inside a predefined geofence.In accordance with the principles of the present invention, get triggerside fast 102 returns an “outside”, “boundary”, or “inside” condition,according to an outcome produced by the point in circle algorithm. Gettrigger side fast 102 does not take location accuracy in to account.

In accordance with the principles of the present invention, get triggerside fast 102 alerts the least squares geofence method to a potentialchange in geofence side condition for a specified target device, so thatsuch a change may be investigated further through a fast fix cycle.

Table 1 shows criteria required to meet an “inside”, “outside”, and“boundary” condition returned by get trigger side fast 102.

TABLE 1 Condition Criteria Inside Distance/Radius < 80% OutsideDistance/Radius > 120% Boundary Otherwise

In particular, if a distance between a current location of a targetwireless device and the center point (i.e. latitude and longitude of thecenter of a geofence) of a relevant geofence, divided by the radius ofthat relevant geofence is less than 80%, get trigger side fast returnsan “inside” condition for that target wireless device. Moreover, if adistance between a current location of a target device and the centerpoint (i.e. latitude and longitude of the center of a geofence) of arelevant geofence, divided by the radius of that relevant geofence isgreater than 120%, get trigger side fast returns an “outside” conditionfor that target wireless device. Otherwise, get trigger side fastreturns a “boundary” condition for that target wireless device.

Filter locations 104 is an inventive step that is introduced in theleast squares geofence method to filter sample location points retrievedfor a target wireless device. Filter locations 104 is implemented in theleast squares geofence method before a location estimate is computed fora target wireless device.

A conventional least squares (LS) model relies on the assumption thatthe estimated accuracy realistically reflects the true accuracy of thelocation. However, the present inventors have recognized (throughresearching certain Long Term Evolution (LTE) devices) that theestimated accuracy of coarse location generated by Cell ID is toooptimistic. In accordance with the principles of the present invention,filter locations 104 minimizes the effect of blunders and coarse locateson location estimates computed in the least squares geofence method.

FIG. 2 depicts coarse locates retrieved for a target wireless device, inaccordance with the principles of the present invention.

In particular, FIG. 2 depicts a set of sample location points 202retrieved for a wireless device that is stationary at a Seattle office200. However, as depicted in FIG. 2, sample location points 202retrieved for the stationary wireless device periodically jump acrossLake Washington 204. Although the accuracy of coarse locates 206retrieved for the stationary wireless device is approximately 1.5 km,the true error of coarse locates 206 is actually over 11 km. Hence,course locates 206 depicted in FIG. 2 are better considered blunders asopposed to valid data.

Filter locations 104 minimizes the effect of coarse locates on locationestimates computed via the least squares geofence method. In particular,before a location estimate is computed for a target wireless device,filter locations 104 filters sample location points (i.e. locationinputs) retrieved for that device with accuracies greater than 1 km.Hence, locations having accuracies greater than 1 km are not used tocompute location estimates in the inventive least squares geofencemethod.

Calculate least squares location 106 is yet another inventive stepintroduced in the least squares geofence method. Calculate least squareslocation 106 calculates a location estimate for a target wireless deviceusing a conventional weighted least squares (LS) model. A conventionalweighted least squares (LS) model naturally places more emphasis on goodquality data and less emphasis on poor quality data retrieved for atarget wireless device.

FIG. 3 depicts an exemplary weighted least squares (LS) locationestimate computed for a target wireless device, in accordance with theprinciples of the present invention.

In particular, FIG. 3 depicts a weighted least squares (LS) locationestimate 300 computed using 3 network locates 302 and 2 GPS locates 304retrieved for a target wireless device 306. As depicted in FIG. 3, whencomputing the weighted least squares (LS) location estimate 300, theweighted least squares model naturally gravitates toward the 2 GPSlocates 304 retrieved for the target device and naturally de-weights the3 network locates 302.

In accordance with the principles of the present invention, filterlocations 104 is the only filter that is required at the data inputlevel of the least squares geofence method, due to use of a weightedleast squares (LS) model to compute location estimates.

In accordance with the principles of the present invention, calculateleast squares location 106 calculates a weighted least squares (LS)location estimate for a target wireless device based on sample locationpoints retrieved for that device in a conventional fast fix cycle. Atleast 2 valid sample location points are required to compute a leastsquares (LS) location estimate for a target wireless device. Theweighted least squares (LS) model used within the inventive leastsquares geofence method assumes that all sample location pointsretrieved for a target wireless device, describe a true location.

The parametric least squares (LS) model employed in the least squaresgeofence method is described by the following equations:F(x _(i))=x ₀ , F(y _(i))=y ₀;{circumflex over (X)}=X ₀+{circumflex over (δ)}Where,

$X_{0} = {\begin{bmatrix}x_{0} \\y_{0}\end{bmatrix} = \begin{bmatrix}0 \\0\end{bmatrix}}$(set initial estimates equal to zero){circumflex over (δ)}=−(N)⁻¹ uN=A ^(T) PAu=A ^(T) Pw

$A = {\begin{bmatrix}\frac{\partial{F\left( x_{i} \right)}}{\partial x} & \frac{\partial{F\left( x_{i} \right)}}{\partial y} \\\frac{\partial{F\left( y_{i} \right)}}{\partial x} & \frac{\partial{F\left( y_{i} \right)}}{\partial y} \\\vdots & \vdots\end{bmatrix} = \begin{bmatrix}1 & 0 \\0 & 1 \\\vdots & \vdots\end{bmatrix}}$ $P = {C_{l}^{- 1} = \begin{bmatrix}\sigma_{x\; 1}^{2} & \sigma_{x_{1}y_{1}} & 0 \\\sigma_{x_{1}y_{1}} & \sigma_{y\; 1}^{2} & 0 \\0 & 0 & \ddots\end{bmatrix}^{- 1}}$ $w = {{X_{0} - \left\lfloor \begin{matrix}x_{1} \\y_{1} \\\vdots\end{matrix} \right\rfloor} = {- \left\lfloor \begin{matrix}x_{1} \\y_{1} \\\vdots\end{matrix} \right\rfloor}}$C _(i)={circumflex over (σ)}₀ ² N ⁻¹

Where,

${\hat{\sigma}}_{C}^{2} = \frac{{\hat{v}}^{T}P\;\hat{v}}{n - u}$v̂ = A δ̂ + W

n=number of observations

u=number of unknowns

However, the present invention simplifies the previous process byeliminating the covariance between x_(n) and y_(n) and setting thevariance of x_(n) and y_(n) equal. Simplification of the least squares(LS) fit calculation results in the following equations:

$\mspace{20mu}{N = \begin{bmatrix}N_{x} & 0 \\0 & N_{y}\end{bmatrix}}$$\mspace{20mu}{{Where},\mspace{20mu}{N_{x} = {N_{y} = {\frac{1}{\sigma_{1}^{2}} + \frac{1}{\sigma_{2}^{2}} + \ldots + {\frac{1}{\sigma_{n}^{2}}({Compute})}}}}}$$\mspace{20mu}{u = {- \begin{bmatrix}u_{x} \\u_{y}\end{bmatrix}}}$$\mspace{20mu}{{Where},\mspace{20mu}{u_{x} = {\frac{x_{1}}{\sigma_{1}^{2}} + \frac{x_{2}}{\sigma_{2}^{2}} + \ldots + {\frac{x_{n}}{\sigma_{n}^{2}}({Compute})}}}}$$\mspace{20mu}{u_{y} = {\frac{y_{1}}{\sigma_{1}^{2}} + \frac{y_{2}}{\sigma_{2}^{2}} + \ldots + {\frac{y_{n}}{\sigma_{n}^{2}}({Compute})}}}$${\hat{\sigma}}_{C}^{2} = {\frac{\left( {x_{1} - \hat{x}} \right)^{2} + \left( {y_{1} - \hat{y}} \right)^{2}}{\sigma_{1}^{2}} + \frac{\left( {x_{2} - \hat{x}} \right)^{2} + \left( {y_{2} - \hat{y}} \right)^{2}}{\sigma_{2}^{2}} + \ldots + {\frac{\left( {x_{n} - \hat{x}} \right)^{2} + \left( {y_{n} - \hat{y}} \right)^{2}}{\sigma_{n}^{2}}\text{/}\left( {n - u} \right)}}$(Compute)

Solving for the unknowns results in the following:{circumflex over (x)}=N _(x) ⁻¹ u _(x)ŷ=N _(y) ⁻¹ u _(y)C _({circumflex over (x)}) =C _(ŷ)={circumflex over (δ)}₀ ² N _(x) ⁻¹

The previous solution simplifies a least squares (LS) fit calculation sothat matrix inversions, multiplications, and additions are not required.

Table 2 shows operations required to perform steps in a least squares(LS) fit calculation implemented by the least squares geofence method,in accordance with the principles of the present invention.

TABLE 2 Step Operations Compute $\frac{1}{\sigma_{n}^{2}}$ Nmultiplications, N divisions Compute N_(x) N additions Compute u_(x) Nmultiplications, N additions Compute u_(y) N multiplications, Nadditions Compute {circumflex over (σ)}_(o) ² 2N subtractions, 2Nadditions, 3N multiplications, 1 division

As depicted in Table 2, steps performed in a simplified least squares(LS) fit calculation do not contain operations involving costly squareroots or trigonometric functions.

An inventive entering or exiting filter 108 is yet another stepintroduced in the least squares geofence method. An entering or exitingfilter 108 is implemented in the least squares geofence method followingcomputation of a least squares (LS) location estimate for a specifiedtarget device. Once step calculate least squares location has computed aleast squares (LS) location estimate for a given target device, thatlocation estimate is subsequently filtered by the entering or exitingfilter 108 in accordance with an anticipated trigger event (i.e. whethera device is potentially entering or exiting a geofence). For instance,if method get trigger side fast 104 previously returned a state of‘inside’ for a target device, but is now returning a state of ‘outside’,that target device may potentially be exiting a geofence. When a targetdevice is potentially exiting a geofence, the least squares geofencemethod uses a loose exiting filter (500 m) 110 to filter a least squares(LS) location estimate computed for that device. Alternatively, when thecurrent state of a target device is not ‘inside’, that target device maypotentially enter a geofence at any given time. When a device ispotentially entering a geofence, the least squares geofence method usesa tighter entering filter (100 m) 112 to filter a least squares (LS)location estimate computed for that particular device (to minimize theprobability of false entry triggers).

Accuracy of a least squares (LS) location estimate is based on weightedresiduals of a least squares (LS) model used to compute that locationestimate. The least squares (LS) model used within the present inventionassumes that all input locations retrieved for a given target device,describe the same location. Moreover, a small variance computed via theleast squares (LS) model indicates that input locations are tightlycorrelated and the model is a good fit.

In accordance with the principles of the present invention, the leastsquares geofence method assumes that a device located inside a geofenceis relatively stationary and points retrieved for that device via a fastfix cycle are tightly correlated. Consequently, sample location pointshaving poor individual quality (>300 m) are able to yield a computedlocation estimate that is good quality (<100 m). This assumption permitsthe least squares geofence method to use even cell locates with largeerrors in a geofence calculation, because sample location points thatare well-correlated yield a location estimate computed with highconfidence. Input accuracies are not important to the least squares (LS)model employed by the least squares geofence method. Rather, inputaccuracies are only used to weigh inputs to a least squares (LS) model.Moreover, the fit of location data computed via a least squares (LS)model is used to develop an accuracy proclamation for a correspondinglocation estimate, in accordance with the principles of the presentinvention.

FIG. 4 depicts network locates used to compute a location estimate for atarget wireless device, in accordance with the principles of the presentinvention.

In particular, 4 network locates 400 with accuracies between 250 m and700 m are used to compute a least squares (LS) location estimate 402 fora target wireless device 404, as depicted in FIG. 4. Since networklocates 400 shown in FIG. 4 are tightly correlated, the resultantlocation estimate 402 has an accuracy of less than 25 m.

A large variance indicates to the least squares geofence method thatsample location points retrieved for a target wireless device are likelynot describing the same location. Yet, although some sample locationpoints are likely blunders when points retrieved for a target deviceyield an extremely poor fit, the least squares geofence method may notimmediately conclude that such points are blunders because a device inmotion is also likely to produce a model with poor fit.

FIG. 5 depicts exemplary GPS locates retrieved for a device in motion,in accordance with the principles of the present invention.

For instance, FIG. 5 shows a least squares (LS) location estimate 502computed based on 5 GPS locates 500 (4 of which are depicted in FIG. 5)retrieved for a device in motion. GPS locates 500 used to compute theleast squares (LS) location estimate 502 depicted in FIG. 5 haveindividual accuracies of less than 60 m. However, the least squares (LS)location estimate 502 depicted in FIG. 5 yields an accuracy ofapproximately 350 m. To account for devices in motion, the least squaresgeofence method uses a loose filter to filter out blunders, while stillallowing reasonable motion within the system.

Factors such as GPS drift, multipath, biases, atmospheric effects, andcell tower hopping can cause location accuracies to be poorer thanactual. For instance, multipath in an urban environment can introduce asystematic error in GPS positions that is not accounted for in reportedaccuracies. Although a least squares (LS) geofence solution can producean extremely accurate location estimate, the present invention accountsfor unknown factors by limiting a least squares (LS) fit accuracy to 100m. Limiting the least squares (LS) fit accuracy reduces boundary effectsunder unknown circumstances.

In addition to introducing new steps to the existing geofence method,the present invention additionally modifies existing geofence steps, tosimplify the conventional geofence process and reduce any potentialerrors. Modifications made to existing geofence steps are labeled ‘Y’ inFIG. 1.

In particular, existing geofence step wait until next fix time 114 isslightly modified from its original form, in accordance with theprinciples of the present invention. Step wait until next fix time 114calculates a next fix time for a target device and is simplified withinthe present invention to only take location position into account andnot location accuracy.

Table 3 depicts a calculated next fix time for individual fix modes andrelated conditions, in accordance with the principles of the presentinvention.

TABLE 3 Condition Next Fix Time Fast Fix Mode 1 second Slow Fix Mode:Distance <= 3 Miles 3 minutes Slow Fix Mode: Distance > 3 MilesDistance/60 mph

In particular, Table 3 depicts time allotted between individual locationretrievals for different fix modes implemented in the least squaresgeofence method. A point in circle trigger side check is only performedin slow fix mode in the least squares geofence method, so accuracy atthis level is not that important and added complexity is not required.

Enter slow fix mode 116 is another conventional geofence step modifiedwithin the present invention. An existing enter slow fix mode 116switches back to a slow fix mode (from a fast fix mode) after 3consecutive same side conditions or 3 boundary conditions (whichevercomes first). Theoretically, the existing enter slow fix mode 116 mayresult in a maximum of 4 additional fast fixes for a given targetdevice. However, inventive modifications to enter slow fix mode 116permit the least squares geofence method to get 4 additional fast fixes,without evaluating a geofence side condition (i.e. trigger side) aftereach fix. Rather, the inventive enter slow fix mode 116 switches back toa slow fix mode from a fast fix mode after it attempts to get 4additional fast fixes (regardless as to whether fast fixes aresuccessful or not). In accordance with the principles of the presentinvention, rather than evaluating 3 individual geofence side conditionsbased on 3 individual sample location points retrieved for a targetdevice, the inventive enter slow fix mode 116 evaluates a singlegeofence side condition (i.e. trigger side) using a least squareslocation estimate based on 5 collective sample location points retrievedfor a target device.

Get location 118 is yet another step modified in the present invention.Modifications implemented within the least squares geofence methodenable step get location 118 to acquire a larger number of mediumquality data points (i.e. sample location points) for a target device ina shorter period of time. In accordance with the principles of thepresent invention, a larger number of data points (i.e. sample locationpoints) of medium quality are more valuable to the least squaresgeofence method, than a small number of data points of better quality.

Table 4 depicts locate timeouts performed via an existing get locationstep.

TABLE 4 Fix Mode Occurrence Fix Type Timeouts Slow At most every 10Optimal 45 s GPS, 45 s Fix minutes Fix Network Slow At most every 3 GPSFix 45 s GPS Fix minutes Fast Fix At least 2 additional Optimal 45 sGPS, 45 s locates, at most 4 Fix Network additional locates

In particular, Table 4 depicts fix occurrence, fix types, and locatetimeouts implemented by an existing get location step 118, forindividual fix modes implemented in the existing geofence method.

In accordance with the principles of the present invention, conventional3 data point samples do not adequately represent the full variability oflocation data retrieved for a target wireless device. Rather, 3 datapoint samples result in data with high variability and consequentlyyield numerous geofence misfires when used to compute location estimatesin the inventive least squares (LS) geofence method.

FIG. 6 depicts exemplary trigger misfires generated when locationestimates are computed using 3 data point samples retrieved for a targetwireless device, in accordance with the principles of the presentinvention.

In particular, FIG. 6 portrays location information 600 for a targetdevice 602 that passes through a northern geofence and afterwardsremains on the boundary of that northern geofence, located well within asouthern geofence. FIG. 6 additionally depicts least squares (LS)location estimates 604 computed using 3 data point samples retrieved forthat target wireless device 602. As depicted in FIG. 6 locationestimates computed using 3 data point samples inaccurately depict thedevice 602 jumping in and out of the northern geofence, hence provokingnumerous trigger misfires 606.

Least squares (LS) location estimates computed using a series of samplelocation points retrieved for a target wireless device are more accuratethan least squares (LS) location estimates computed using 3 data pointsamples.

FIG. 7 depicts error circles for a series of indoor locates retrievedfor a target wireless device, in accordance with the principles of thepresent invention.

In particular, error circles 700 depicted in FIG. 7 indicate that evenwhen accuracies for individual locations 700 are poor, a least squares(LS) location estimate 704 computed using a series of locations 706 mayprovide a good indication of a device's true location 702.

The number of trigger misfires generated by the least squares geofencemethod significantly decreases when least squares location estimates arecomputed using 5 sample location points.

FIG. 8 depicts exemplary geofence triggers generated when a locationestimate is computed using 5 sample location points retrieved for atarget wireless device, in accordance with the principles of the presentinvention.

In particular, FIG. 8 depicts location information 800 and least squares(LS) location estimates 802 computed using 5 sample location points(i.e. 5 sample location points) retrieved for a target wireless device804. A comparison of FIG. 8 to FIG. 6 (i.e., FIG. 6 portrays locationestimates computed using 3 sample location points) shows that fewertrigger misfires 806 are generated when location estimates 802 arecomputed using a 5 data point sample as opposed to a 3 data pointsample.

However, retrieving 5 sample location points using the existing getlocation 118 step results in a maximum delay of 7.5 minutes under indoorconditions. Consequently, the least squares geofence method modifies theexisting get location 118 step to use a 15 second GPS locate timeoutduring a fast fix cycle as opposed to a conventional 45 second GPSlocate timeout. Modifications to the existing get location 118 stepenable a larger number of medium quality data points (i.e. samplelocation points) to be acquired in a shorter period of time.

Table 5 depicts locate timeouts performed via a modified get location118 step, in accordance with the principles of the present invention.

TABLE 5 Fix Mode Occurrence Fix Type Timeouts Slow At most every 3Optimal 45 s GPS, 45 s Fix minutes Fix Network Fast Fix 4 additionallocates Optimal 15 s GPS, 45 s Fix Network

In particular, Table 5 depicts GPS locate timeouts and corresponding fixtypes used with different fix modes in the get location 118 stepmodified within the present invention. In addition, Table 5 articulatestime allotted between individual location fixes for individual fix modesimplemented within the inventive least squares geofence method.

To compare inventive and existing geofence performance, the leastsquares geofence method was implemented on Android™ devices usingFLHybrid without a combo location provider. SCG preload build 62 wasused as a baseline for the existing geofence method. FLHybrid and SCGwere both loaded on the same devices with identical geofences set up onboth platforms to guarantee identical testing conditions.

The least squares geofence method was additionally implemented onResearch in Motion (RIM™) devices using FLA and compared with theexisting geofence method. Simultaneous testing was performed using twoseparate devices carried by the same tester. However, comparativetesting implemented on RIM™ devices was performed using different phonemodels, thereby affecting the availability and quality of location data.

In accordance with the principles of the present invention, the leastsquares geofence method generates entry/exit geofence triggers within areasonable amount of time and distance for devices located in urban orindoor environments.

For example, an Android™ device was placed outside a geofence, turnedOFF and subsequently turned back ON inside the geofence at an indoorlocation with no GPS access. Once the device was turned back on (insidethe geofence), the least squares geofence method initiated a fast fixcycle immediately after acquiring a first indoor locate. After 5successful indoor locates, the least squares geofence method computed aleast squares (LS) location estimate for the Android™ device andgenerated an appropriate entry event.

After ensuring that the least squares geofence method was providedenough time to acquire several successful indoor locates, the Android™device was turned OFF and subsequently turned back ON outside thegeofence, at an indoor location with no GPS access. The least squaresgeofence method then initiated a fast fix cycle immediately afteracquiring a first indoor locate. After 5 successful indoor locates, theleast squares geofence method computed a least squares (LS) locationestimate for the Android™ device and generated an appropriate exitevent.

FIG. 9 depicts an exemplary entry event triggered by the least squaresgeofence method based on indoor locates retrieved for a target wirelessdevice, in accordance with the principles of the present invention.

In particular, FIG. 9 depicts location information 900 for a device thatwas placed outside a geofence, turned OFF and subsequently turned backON inside the geofence at an indoor location with no GPS access.Moreover, FIG. 9 depicts an appropriate entry event 904 generated by theleast squares geofence method, based on a least squares (LS) locationestimate 902 computed using 5 successful indoor locates retrieved forthe target wireless device.

FIG. 10 depicts an exemplary exit event triggered by the least squaresgeofence method based on indoor locates retrieved for a target wirelessdevice, in accordance with the principles of the present invention.

In particular, FIG. 10 depicts location information 101 for a devicethat was turned OFF inside a geofence and subsequently turned back ONoutside a geofence at an indoor location with no GPS access.Furthermore, FIG. 10 additionally depicts an appropriate exit event 103generated by the least squares geofence method following 5 successfulindoor locates retrieved for the target wireless device.

However, unlike the least squares geofence method, the existing geofencemethod was not able to trigger an entry event nor an exit event forindoor locates depicted in FIGS. 9 and 10.

FIG. 11 depicts exemplary trigger misfires experienced by the existinggeofence method for a target device located in an indoor environment.

In particular, FIG. 11 depicts location information 111 for a targetdevice that was placed outside a geofence, turned OFF, and subsequentlyturned back ON inside the geofence, at an indoor location with no GPSaccess. However, as depicted in FIG. 11, the existing geofence methodwas not able to trigger an entry event nor an exit event based onlocation information retrieved for the target wireless device.

In accordance with the principles of the present invention, the leastsquares geofence method does not generate trigger misfires for devicesthat straddle a geofence boundary for an extended period of time.

FIG. 12 portrays an entry trigger generated for a device straddling ageofence boundary for a prolonged period of time, in accordance with theprinciples of the present invention.

As depicted in FIG. 12, a target device resides on a boundary of ageofence (i.e. outside a geofence) 121, with several locations for thatparticular target device reported inside the geofence. However, no entrytriggers are generated by the least squares geofence method until thedevice physically enters the geofence and passes through it. Hence, anentry event 123 is only triggered for the target wireless device whenthe least squares geofence method has sufficient confidence that thedevice has indeed entered the geofence. As depicted in FIG. 12, theleast squares geofence method is able to capture true variability indata retrieved for a target wireless device.

FIG. 13 portrays an exit trigger generated for a device straddling ageofence boundary for a prolonged period of time, in accordance with theprinciples of the present invention.

As shown in FIG. 13, a target device exits a geofence then resides nearthe boundary 133 of that geofence, with several locations for thatparticular target device reported inside the geofence. As depicted inFIG. 13, the least squares geofence method generates an exit trigger 131for the target device immediately after the device exits the geofence.No subsequent re-entries are triggered.

In accordance with the principles of the present invention, the leastsquares geofence method performs on par with the existing geofencemethod in outdoor, high GPS environments.

FIGS. 14A through 14C depict exemplary geofence events triggered by theleast squares geofence method and the existing geofence method based onoutdoor locates retrieved for a target wireless device, in accordancewith the principles of the present invention.

In particular, pins labeled ‘G’ in FIGS. 14A through 14C indicatelocation of events 141 triggered by the least squares geofence method.Pins labeled ‘R’ in FIGS. 14A through 14C, indicate location of events141 triggered by the existing geofence method. As depicted in FIGS. 14Athrough 14C, appropriate geofence events 141 are triggered by both theleast squares geofence method and the existing geofence method fordevices located in outdoor, high GPS environments. However, the leastsquares geofence method is able to issue exit events earlier than theconventional geofence method for devices located in urban environments.

FIG. 14C depicts exit events 141 generated by the least squares geofencemethod and the existing geofence method for a target wireless devicelocated in an urban environment. As portrayed in FIG. 14C, the leastsquares geofence method triggers an exit event 141G for the targetwireless device two minutes earlier than the conventional geofencemethod triggers the same exit event 141R.

In accordance with another aspect of the present invention, the leastsquares geofence method avoids various blunders that are otherwiseunavoidable in the existing geofence method. For instance, the existinggeofence method occasionally triggers exit events for devices that arestationary within a geofence, whereas the least squares geofence methoddoes not.

FIG. 15 shows location information for a wireless device that isresident within three defined geofences, in accordance with theprinciples of the present invention.

In particular, FIG. 15 depicts severe location blunders 151 incurred fora device located within three defined geofences. However, despitelocation blunders, the least squares geofence method does not experienceany trigger misfires. Rather, the least squares geofence method triggerstwo valid exit events 153 once the device exits the inner two geofences,as depicted in FIG. 15.

In accordance with the principles of the present invention, the leastsquares geofence method does not obtain significantly more locates thanthe existing geofence method.

For example, the least squares geofence method retrieves sample locationpoints approximately every 3 minutes for a stationary Research In Motion(RIM™) device placed inside a geofence overnight. This 3 minute intervalis the same interval the existing geofence method uses to retrievesample location points for a target wireless device.

FIG. 16 portrays a locations log for an exemplary device that isstationary inside a geofence, in accordance with the principles of thepresent invention.

In particular, FIG. 16 shows an exemplary locations log 161 of locationupdates requested by the least squares geofence method for a wirelessdevice that enters a geofence at approximately 0:34 GMT. FIG. 16additionally depicts five sample location points 163 used to trigger anentry event for that particular wireless device.

FIG. 17 portrays an exemplary locations log for a wireless device thatexits a geofence and remains near the boundary of that geofence, inaccordance with the principles of the present invention.

In particular, FIG. 17 depicts a locations log 171 of location updatesrequested by the least squares geofence method for a device that exits ageofence and then remains near the boundary of that geofence. Asdepicted in FIG. 17, even under boundary conditions, location updatesare only requested by the least squares geofence method approximatelyevery 3 minutes. FIG. 17 also depicts five sample location points 173used to generate an exit event for the corresponding wireless device.

FIG. 18 shows a map of locations relative to the location log depictedin FIG. 17.

In particular, FIG. 18 depicts an exit trigger 181 generated for atarget wireless device, based on sample location points 173 retrievedfor that device and logged in the locations log depicted in FIG. 17.FIG. 18 also depicts subsequent location information 183 retrieved forthe relevant target device, relative to location updates indicated inthe locations log 171 depicted in FIG. 17.

In accordance with the principles of the present invention, the leastsquares geofence method increases sensitivity under indoor conditionswhere GPS is not available, and extracts meaningful information evenfrom poor quality sample location points. In addition, the least squaresgeofence method is able to obtain a statistical location estimate for atarget wireless device based on multiple sample location points, therebyincreasing the probability of valid “entry” events under urban or indoorconditions. The existing geofence method, however, is extremelysensitive to position quality under indoor conditions and unable toobtain network locates in many circumstances.

The least squares geofence method is additionally capable of extractingmore information from input data than the existing geofence method,thereby rendering location blunders less detrimental to the leastsquares geofence method. In addition, the present invention only filtersextreme blunders, so the model's degree of fit determines whether or notadditional blunders are present. Furthermore, the least squares geofencemethod is able to reduce exit misfires caused by blunders such as celltower hopping while still allowing the least squares (LS) model to useall location information with accuracies less than 1 km.

Geofence sensitivity is increased in the least squares geofence method,hence extreme data variability (>1 km) becomes a problem whenvariability straddles a geofence border for a prolonged period of time.As portrayed in FIG. 8, a majority of data variability is captured in aleast squares (LS) location estimate computed using 5 sample locationpoints. However, if there are 5 consecutive highly correlated datapoints far enough inside or outside a predefined geofence, an entry/exitevent may be triggered. Although decreasing the sensitivity of thegeofence would reduce trigger misfires, decreased sensitivity would alsoreduce the effectiveness of the geofence. Fortunately, prolongedvariability greater than 1 km is not common, and administratorstypically center geofences around resting locations.

In accordance with the principles of the present invention,modifications to the GPS fix timeout implemented in fast fix mode doesnot significantly affect the geofence in the least squares geofencemethod, because the GPS chip is hot after the first optimal fix in slowfix mode is implemented. Furthermore, GPS fixes are preferably readilyavailable in rural environments. However, should a GPS fix beunavailable, the least squares geofence method may become susceptible tonetwork location biases due to weak cell tower geometry and sparse celltowers in rural environments.

The least squares geofence method has sufficient sensitivity to supportquarter mile geofences. Under severe data variation conditions, boundaryeffects may be significant for quarter mile geofences because 1 kmlocation variations become significant for a quarter mile (805 m)diameter geofence.

The least squares geofence method does not adversely affect batteryconsumption. The number and frequency of sample location pointsretrieved for a target wireless device are identical in the leastsquares geofence method and the existing geofence method under mostcircumstances. However, the least squares geofence method performs morefast location fixes than the conventional geofence method, therebyresulting in increased battery consumption. However, fast fixes now havea shorter GPS timeout, which reduces battery consumption under urban orindoor conditions.

In accordance with the principles of the present invention, a geofencemethod and technology that further increases the probability of accurateentry/exit geofence triggers without additionally increasing theprobability of inaccurate entry/exit geofence triggers, comprises aKalman filter geofence method. A Kalman filter geofence method uses aKalman filter to filter location data retrieved for a target wirelessdevice. Filtered location data is analyzed to determine if a targetdevice has entered or exited a predefined geographic location (i.e. apredefined geofence).

A Kalman filter is an existing algorithm that uses a series ofmeasurements observed over time, containing noise (random variations)and other inaccuracies, to produce estimates of unknown variables.Estimates produced by a Kalman filter tend to be more precise than thosebased on a single measurement alone. The Kalman filter has numerousapplications in technology. For instance, the Kalman filter is commonlyused for guidance, navigation, and control of vehicles, aircraft andspacecraft.

The Kalman filter is based on linear dynamic systems discretized in thetime domain. At each time increment the dynamic system is modeled by aset of system states and a linear transition function (matrix). Theexisting Kalman filter model assumes that a true state at time k isevolved from a state at (k−1) according to:X _(k) =A _(k) X _(k-1) +B _(k) u _(k) +w _(k),where A_(k) is the state transition model applied to the previous stateX_(k-1); B_(k) is the control-input model applied to the control vectoru_(k); and w_(k) is the process noise which is assumed to be drawn froma zero mean multivariate normal distribution with covariance Q_(k):W _(k) ˜N(0,Q _(k)).

At time k, an observation (or measurement) z_(k) of a true state X_(k)is made according to:z _(k) =H _(k) X _(k) +v _(k),where H_(k) is the observation model that maps the true state space intothe observed space, and v_(k) is the observation noise (assumed to bezero mean Gaussian white noise) with covariance R_(k):v _(k) ˜N(0,R _(k)).

The optimal estimation to the system states is:

Predict:{circumflex over (X)} _(k|k-1) =A _(k) {circumflex over (X)} _(k-1|k-1)+B _(k) u _(k)P _(k|k-1) =A _(k) P _(k-1|k-1) A _(k) ^(T)Update:S _(k) =H _(k) P _(k∥k-1) H _(k) ^(T) +R _(k)K _(k) =P _(k|k-1) H _(k) ^(T) S _(k) ⁻¹{circumflex over (X)} _(k|k) ={circumflex over (X)} _(k|k-1) +K _(k)(z_(k) −H _(k) {circumflex over (X)} _(k|k-1))P _(k|k)=(I−K _(k) H _(k))P _(k∥k-1)

Table 6 lists performance of the existing Kalman filter (i.e. ANSI C orJava version) when implemented on an Android device.

TABLE 6 Calculation Speed 50 micro second per location estimate MaximumStack Size 100 bytes Maximum heap Size 150 bytes

As depicted in Table 6, the Kalman filter (i.e. ANSI C or Java version)has a calculation speed of 50 micro seconds per location estimate, amaximum stack size of 100 bytes, and a maximum heap size of 150 byteswhen implemented on an Android device.

In accordance with the principles of the present invention, the Kalmanfilter geofence method further minimizes the probability of falseentry/exit geofence triggers and optimizes energy usage on a targetdevice for geofence related location determinations. A Kalman filtergeofence method also overcomes certain limitations of the existinggeofence method and the least squares geofence method. For instance, aKalman filter geofence method is able to address a target device that ismoving, as well as a geofence that is moving, whereas both the existinggeofence method and the least squares geofence method assume that atarget device is static (i.e. not in motion). Hence, the least squaresgeofence method and the existing geofence method both fail to produceaccurate geofence crossing results for a target device in fast movingmode, whereas the Kalman filter geofence method does not.

Moreover, the Kalman filter geofence method can estimate velocity andheading of a moving target to improve location information retrieved fora target wireless device. Yet, the existing geofence method and theleast squares geofence method only use raw location data obtained fromsensors to make initial judgments of geofence boundary crossing (i.e. todetermine an initial geofence side condition). However, raw locationdata contains position errors ranging from 500 m to several kilometersin areas where GPS signal is not available. When a target device locatedin an area where GPS signal is not strong or not available, locationblunders may cause the least squares geofence method and/or the existinggeofence method to determine an inaccurate initial geofence sidecondition for that target device, which, in turn, may lead to a missedentry/exit geofence trigger.

Furthermore, a Kalman filter geofence method dynamically determines anumber of location determinations required to refine an initial judgmentof geofence boundary crossing (i.e. an initial geofence side condition)for a target wireless device. Alternatively, the least squares geofencemethod and the existing geofence method use a pre-defined number ofconsecutive location determinations to refine an initial geofenceboundary crossing judgement (i.e. initial geofence side condition). Whenlocation determination is performed by a GPS system with very smalluncertainty, a pre-defined number of consecutive location determinationsperformed thereafter yields only additional energy consumption on arelevant target device.

For a quarter mile geofence, accuracy of a location fix is moresensitive to the least squares geofence method and the existing geofencemethod than it is to the Kalman filter geofence method.

FIG. 22 depicts an exemplary Kalman filter geofence method call flow, inaccordance with the principles of the present invention.

In particular, the Kalman filter geofence method consists of thefollowing inventive geofence modules: a system model/estimation module1001, a data quality analysis module 1002, a geofence crossing detectionmodule 1003, a next location time request module 1004, and a tripprofile estimation module 1005.

A system model/estimation module 1001 is a Kalman filter geofence modulethat uses a set of parameters to describe a general dynamic behavior ofa target wireless device. Parameters used in the system model/estimationmodule 1001 include position, velocity and heading. Various locationsensors (e.g. GPS, WI-FI, cellular network, etc.) are used as input tothe system model/estimation module 1001 to permit a Kalman filter toestimate the dynamics of a target wireless device. This is similar toleast squares estimation, except that the present invention appreciatesthat Kalman filter results in better and more consistent estimation.

Additional sensor sources (e.g. gyros, accelerometers, compass, etc.) ona target wireless device may also be incorporated in to the systemmodel/estimation module 1001 (in addition to sensors listed above (e.g.GPS, WI-FI, cellular network, etc.)) to further enhance systemmodel/estimation module 1001 parameter estimations.

Estimated position parameters (i.e. position estimates) generated by thesystem model/estimation module 1001 are used for raw sensor data blunderdetection and geofence crossing determinations in the inventive Kalmanfilter geofence method. Moreover, estimated velocity and headingparameters generated by the system model/estimation module 1001 are usedto determine a target device dynamic trip profile estimation. A dynamictrip profile estimation is used to refine the system model/estimationmodule 1001 by restricting a maximum value (e.g. maximum speed) in thesystem model/estimation module 1001 used to generate parameterestimations for a given target device. Furthermore, in accordance withthe principles of the present invention, estimated velocity and headingparameters are used for geofencing and for trip profile, andadditionally optimize battery consumption on a target wireless device.

FIG. 23 depicts an exemplary position estimate generated by the systemmodel/estimation module for a target wireless device, in accordance withthe principles of the present invention.

In particular, FIG. 23 portrays raw cellular network location data 231retrieved for a target wireless device in fast moving mode (on a bus ora train). Further, FIG. 23 additionally depicts system model/estimationmodule 1001 estimated position results 233 generated for that sametarget wireless device. As depicted in FIG. 23, estimated results 233generated by the system model/estimation module 1001 are much closer tothe bus or train route 235 traced by the target wireless device, thanraw cellular network location data 231 retrieved for that particulartarget device.

Velocity and heading estimates generated by the system model/estimationmodule 1001 in the Kalman filter geofence method permit accurateentry/exit geofence triggers to be generated for a target device inmotion.

FIG. 24 depicts an exemplary velocity estimate produced by a systemmodel/estimation module, in accordance with the principles of thepresent invention.

In particular, FIG. 24 portrays raw velocity data 241 retrieved for atarget wireless device and a velocity estimate 243 generated by thesystem model/estimation module 1001 for that same target wirelessdevice. Estimated velocity information 243 portrayed in FIG. 24represents the target device's actual velocity much better than rawvelocity data 241 retrieved for that same target wireless device.

In accordance with the principles of the present invention, a dataquality analysis module 1002 is an inventive Kalman filter geofencemodule that analyzes a position estimate output from the systemmodel/estimation module 1001 to statistically determine quality oflocation data retrieved for a target wireless device. The data qualityanalysis module 1002 additionally uses position estimates generated bythe system model/estimation module 1001 to detect location blunders inlocation data retrieved for a target wireless device. The problem withprevious geofence algorithms is that there is no way to mathematicallycalculate the reliability of the geofence entry/exit. With least squaresand Kalman filter, statistical tools are introduced to calculate thereliability of an entry/exit geofence.

Exemplary quality analysis and blunder detection criteria employed bythe data quality analysis module 1002 is described by the followingequation:∥X _(k) −z _(k) ∥>KΣ,where X_(k) is an estimated location generated by the Kalman filtergeofence method, z_(k) is an observed location retrieved from thenetwork, Σ is an estimated accuracy generated by the Kalman filtergeofence method, and K is a constant.

FIG. 25 depicts exemplary blunder detection performed by the Kalmanfilter geofence method on cell network location data collected for atarget wireless device, in accordance with the principles of the presentinvention.

In particular, FIG. 25 depicts a position estimate 253 generated by thesystem model/estimation module 1001 for a target wireless device.Moreover, FIG. 25 additionally depicts a raw position 251 retrieved froma cell network location sensor for that same target wireless device. Theraw position 251 is an outlier located 1.5 km away from the positionestimate 253 computed for the target wireless device. In accordance withthe principles of the present invention, the Kalman filter geofencemethod is able to correct the outlier 251 present in network locationdata retrieved for the target wireless device, and generate a positionestimate 253 that is closer to the device's actual position 255. Asdepicted in FIG. 25, the position estimate 253 generated by the systemmodel/estimation module 1001 in the Kalman filter geofence method ismuch closer to the device's true position 255 (on a highway) than theraw position 251 retrieved via the cell network location sensor.

In accordance with the principles of the present invention, an inventivegeofence crossing detection module 1003 is implemented in the Kalmanfilter geofence method following quality analysis. The geofence crossingdetection module 1003 uses a position estimate generated by the systemmodel/estimation module 1001 to determine if a relevant target devicehas crossed a geofence boundary.

For a given confidence level, the Kalman filter geofence methoddynamically determines a number of location fixes required to refine aninitial geofence boundary crossing judgment (i.e. initial geofence sidecondition). In particular, the Kalman filter geofence method dynamicallydetermines the quantity of location fixes required to refine an initialjudgment of geofence boundary crossing for a given target device basedon the uncertainty of a position estimate computed for that particulardevice. Dynamically determining quantity of location fixes required fora target wireless device conserves energy consumption and improvesaccuracy of location information retrieved for that particular targetdevice. Least squares uses fixed number of fast cycles, while theinventive Kalman filter techniques dynamically determine the number offast cycles required.

For instance, for a target device located in an area where only cellularnetwork location determination is available, a dynamic number oflocation fixes reduces the probability of missed boundary crossingalerts for that particular target device. Furthermore, for a targetdevice located in an area where GPS signal is available, a dynamicnumber of location fixes reduces the number of location fixes performedfor that target device, thereby conserving the device's energy.

In accordance with the principles of the present invention, a nextlocation time request module 1004 dynamically determines time intervalsbetween location fixes implemented in the inventive Kalman filtergeofence method. In particular, the next location time request module1004 utilizes velocity and heading parameter estimations generated bythe system model/estimation module 1001 to dynamically determine anappropriate time interval to implement prior to retrieving a subsequentlocation fix. For instance, if a target device is departing in adirection opposite a geofence boundary, the next location time requestmodule 1004 may increase the time interval between location fixes tosave energy on that target device. In an alternative embodiment, if atarget device is departing in a direction opposite a geofence boundary,the next location time request module 1004 may select a more energyefficient location fix (e.g. a cellular network location fix instead ofa GPS location fix) for that particular target device, rather thanincreasing a time interval between location fixes (as long as locationuncertainty does not impact a geofence boundary crossing confidencelevel).

In accordance with the principles of the present invention, a tripprofile estimation module 1005 analyzes historical heading and velocityparameter estimates output by the system model/estimation module 1001 toestablish a trip profile model for a target wireless device. Tripprofile information may be used as feedback to the systemmodel/estimation module 1001 to further refine dynamic parameters for atarget wireless device. For instance, trip profile information may beused to implement a constrained state Kalman filter estimation.

A constrained state Kalman filter estimation is described by thefollowing equation:X _(k) =A _(k) X _(k-1) +B _(k) u _(k) +w _(k),and the observation is:z _(k) =H _(k) X _(k) +v _(k),with the constraints:∥{dot over (X)}∥<V _(profile),where {dot over (X)} is the velocity states in the Kalman dynamic modeland V_(profile) is the velocity defined by the trip profile.

For a quarter mile geofence, accuracy of a location fix is moresensitive to the least squares geofence method and the existing geofencemethod that it is to the Kalman filter geofence method.

The Kalman filter geofence method helps the quarter mile geofence byusing a Kalman filter estimated location to decide a geofence sidechange instead of using raw location data. The Kalman filter geofencemethod gives better estimates of a network location of a target device,thereby reducing the probability of generating incorrect entry/exitgeofence triggers.

The Kalman filter geofence method further helps the quarter milegeofence by detecting location blunders in location data retrieved for atarget wireless device. The Kalman filter geofence method detectslocation blunders by comparing raw location data retrieved for a targetwireless device to a position estimate computed in the systemmodel/estimation module 1001 for that same target wireless device.

Moreover, the Kalman filter geofence method helps the quarter milegeofence by utilizing velocity and heading information to generategeofence crossing determinations, optimize battery consumption, andestablish a target movement profile for a relevant target device.

FIG. 26 depicts an illustrative example of heading information retrievedfor a target wireless device, in accordance with the principles of thepresent invention.

In particular, when a target device is entering 263 a geofence ordeparting 261 from a geofence (as depicted in FIG. 26) under boundarycondition, the Kalman filter geofence method can request additionallocation fixes for that target wireless device based on relevantvelocity and heading information maintained thereon. Additional locationfixes permit the Kalman filter geofence method to further evaluate arelevant geofence side change condition. Moreover, when a target deviceis departing from a geofence 261, the Kalman filter geofence method canrelax a location fix interval to reduce the number of location fixesretrieved for that target wireless device, thereby conserving thatdevice's battery consumption. Furthermore, velocity and headinginformation may be used to establish a movement profile for a targetwireless device. A movement profile is used to optimize the dynamicmodel and optimize error estimation, in accordance with the principlesof the present invention. For example, velocity and heading parameterestimations may be used in a constrained state Kalman filter estimation.

The least squares geofence method and the existing geofence method maybe easily modified to incorporate a Kalman filter. In fact, a Kalmanfilter may easily be implemented in any suitable geofence method.

FIG. 27 depicts exemplary implementation of a Kalman filter in anexisting geofence method, in accordance with the principles of thepresent invention.

As depicted in FIG. 27, a Kalman filter is employed in an existinggeofence method by processing every location fix 273 retrieved for atarget wireless device by a Kalman filter 271 before determining anyside changes or geofence trigger decisions for that particular targetwireless device.

Although the present disclosure describes the Kalman filter geofencemethod and system using a single location target (target device) and asingle pre-defined geographic region (the geofence) as example, one ofordinary skill in the art will readily recognize that the disclosure canbe easily applied to combinations of any arbitrary number of targetdevices and geofences.

The dynamic system model/estimation module 1001 may be implemented invarious applications to provide improved location estimation whereperiodic location determination data is available, e.g., turn-by-turnnavigation, vehicle tracking, etc.

The Kalman filter geofence method has particular applicability tocaretaker services and location aware mobile marketing. For instance,the Kalman filter geofence method permits family members, parents,employers, etc., to monitor location information for children, familymembers, friends, employees, etc. Moreover, a Kalman filter geofencemethod permits merchants and/or marketers to push information (e.g.marketing information, weather, traffic warnings, construction updates,road conditions, safety warnings, etc.) to a device once that devicecrosses a relevant geofence boundary.

While the invention has been described with reference to the exemplaryembodiments thereof, those skilled in the art will be able to makevarious modifications to the described embodiments of the inventionwithout departing from the true spirit and scope of the invention.

What is claimed is:
 1. A method of detecting a geofence crossing,comprising: Kalman filtering a plurality of past individual locationfixes retrieved for a wireless device to produce a latestKalman-filtered location of said wireless device; determining movementof a target device in a direction away from a geofence boundary;dynamically determining a more energy efficient location fix before asubsequent Kalman-filtered location of said wireless device, said moreenergy efficient location fix being determined based on a direction ofsaid wireless device relative to said geofence boundary.
 2. The methodof detecting a geofence crossing according to claim 1, wherein said moreenergy efficient location fix comprising: a cellular network locationfix.
 3. The method of detecting a geofence crossing according to claim1, wherein said past individual location fixes comprise: a globalpositioning satellite (GPS) location fixes.
 4. The method of detecting ageofence crossing according to claim 3, wherein said more energyefficient location fix comprising: a cellular network location fix.
 5. AKalman filter geofence method, comprising: obtaining a plurality oflocations of a moving target wireless device; predicting a velocity andheading of said moving target wireless device by filtering saidplurality of locations with a Kalman filter module; triggering aboundary crossing of a moving geofence by said moving target wirelessdevice based on a latest Kalman-filtered location of said moving targetwireless device, and said estimated velocity and heading of said movingtarget wireless device, and based on said moving geofence having a givenmoving boundary; and dynamically generating an entry or exit geofencetrigger for said target wireless device.
 6. The Kalman filter geofenceaccording to claim 5, wherein: said target wireless device is operatingin a fast moving mode.
 7. The Kalman filter geofence according to claim5, further comprising: detecting a location blunder of said latestKalman-filtered location of said target wireless device using saidlatest Kalman-filtered location.
 8. The Kalman filter geofence accordingto claim 5, further comprising: dynamically determining an appropriatenumber of individual location fixes retrieved for said target wirelessdevice to produce a subsequent Kalman-filtered location of said targetwireless device.
 9. The Kalman filter geofence according to claim 5,further comprising: obtaining a current location of said target wirelessdevice based both on said latest Kalman-filtered location, and on apredicted velocity and heading of said target wireless device relativeto said moving given geofence.
 10. The Kalman filter geofence accordingto claim 5, wherein: said moving geofence is moving differently frommovement of said moving target wireless device.
 11. The Kalman filtergeofence according to claim 5, further comprising: reducing a timeinterval between successive location fixes for said target wirelessdevice when said latest Kalman-filtered location is outside saidboundary of said moving geofence.
 12. The Kalman filter geofenceaccording to claim 5, further comprising: creating a trip profile forsaid target wireless device based on a historical measurement of saidpredicted velocity and heading of said moving target wireless device.13. A Kalman filter geofence method, comprising: obtaining a pluralityof locations of a moving target wireless device; predicting a velocityand heading of said moving target wireless device by filtering saidplurality of locations with a Kalman filter module; triggering aboundary crossing of a moving geofence by said moving target wirelessdevice based on a latest Kalman-filtered location of said moving targetwireless device, and said estimated velocity and heading of said movingtarget wireless device, and based on said moving geofence having a givenmoving boundary; and dynamically determining an appropriate number ofindividual location fixes retrieved for said moving target wirelessdevice to produce a subsequent Kalman-filtered location of said movingtarget wireless device, based on said predicted velocity of said movingtarget wireless device.
 14. The Kalman filter geofence according toclaim 13, wherein: said target wireless device is operating in a fastmoving mode.
 15. The Kalman filter geofence according to claim 13,further comprising: detecting a location blunder of said latestKalman-filtered location of said target wireless device using saidlatest Kalman-filtered location.
 16. The Kalman filter geofenceaccording to claim 13, further comprising: dynamically determining anappropriate number of individual location fixes retrieved for saidtarget wireless device to produce a subsequent Kalman-filtered locationof said target wireless device.
 17. The Kalman filter geofence accordingto claim 13, further comprising: obtaining a current location of saidtarget wireless device based both on said latest Kalman-filteredlocation, and on a predicted velocity and heading of said targetwireless device relative to said moving given geofence.
 18. The Kalmanfilter geofence according to claim 13, wherein: said moving geofence ismoving differently from movement of said moving target wireless device.19. The Kalman filter geofence according to claim 13, furthercomprising: reducing a time interval between successive location fixesfor said target wireless device when said latest Kalman-filteredlocation is outside said boundary of said moving geofence.
 20. TheKalman filter geofence according to claim 13, further comprising:creating a trip profile for said target wireless device based on ahistorical measurement of said predicted velocity and heading of saidmoving target wireless device.